<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
  <div id="app">
      <input type="text" v-model='msg'>
      <h1>{{msg}}</h1>
      <input type="text" v-model.number='num1'>
      <h1>{{add}}</h1>
      <hr>
      <h1>{{aaa()}}</h1>
  </div>
  <script src="./vue.js"></script>
  <script>
    var vm = new Vue({
      el:'#app',
      data:{
        msg: 'hello vue',
          num1: 10,
          num2: 20,
          num3: 30
      },
      methods:{
          aaa() {
              console.log('aaa');
              console.log(this.num1);
              console.log(this.msg);
              return '你好 aaa '
          }
      },
      computed: {
          add() {
              console.log('111');
              return this.num1*1 + this.num2*1 + this.num3*1
          }
      }
     });
  </script>
</body>
</html>
